﻿using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using System.ComponentModel.DataAnnotations;
using System.Composition.Convention;
using WebAPI.Util;
using Xunit.Sdk;

namespace RapidSalesAdminPortalAPI.Models
{
    public class MasterDataListRequest : BasePageInput
    {
        public string? Code { get; set; }
        public string? Name { get; set; }
        public string? Value { get; set; }
        public string OptionSetGroup { get; set; }
        public string Description { get; set; }
        public string? Enable { get; set; }
    }

    public class SystemListRequest : BasePageInput
    {
        public string Description { get; set; }
        public string OptionSetGroup { get; set; }
    }
    public class MasterDataLisResponse
    {
        public Guid Id { get; set; }
        public string Code { get; set; }
        public string Name { get; set; }
        public string Value { get; set; }
        public string OptionSetGroup { get; set; }

        public string ParentCode { get; set; }
        public string Description { get; set; }
        public bool Enable { get; set; }
    }

    public class InsertMasterDataRequest
    {
        public string Code { get; set; }
        public string ParentCode { get; set; }
        public string Name { get; set; }
        public string Value { get; set; }
        public string Description { get; set; }
        public string? OptionSetGroup { get; set; }
        public bool Enable { get; set; }
    }

    public class UpdateMasterDataRequest
    {
        public Guid Id { get; set; }
        public string Code { get; set; }
        public string Name { get; set; }
        public string Value { get; set; }
        public string OptionSetGroup { get; set; }
        public string ParentCode { get; set; }
        public string Description { get; set; }
        public bool Enable { get; set; }
    }

    public class EnableMasterDataRequest
    {
        [Required(ErrorMessage = "ids is required")]
        public string ids { get; set; }
        public bool enable { get; set; }
    }

    public class MasterDataTreeOutput
    {
        public Guid Id { get; set; }
        public string Code { get; set; }
        public string? ParentCode { get; set; }

        public List<MasterDataTreeOutput> childList { get; set; } = new List<MasterDataTreeOutput>();
    }

    public class GetMasterDataListRequest
    {
        
    }
    public class GetMasterDataListResponse
    {
        public string Code { get; set; }
        public string Name { get; set; }
        public string Value { get; set; }
    }

    public class GetLangDataListRequest
    {
        /// <summary>
        /// 语言标识
        /// </summary>
        [Required(ErrorMessage = "language is required")]
        public int lang { set; get; }
    }
    public class GetLangDataListResponse
    {
        public string Code { get; set; }
        public string Value { get; set; }
    }

}
